<ng-container [formGroup]="form">
  <div class="modal-header">
    <h4 i18n class="modal-title">Edit caption</h4>
    <button class="border-0 p-0" title="Close this modal" i18n-title (click)="hide()">
      <my-global-icon iconName="cross"></my-global-icon>
    </button>
  </div>

  <div class="modal-body">
    <label i18n for="captionFileContent">Caption</label>
    <textarea
      id="captionFileContent"
      formControlName="captionFileContent"
      class="form-control caption-textarea"
      [ngClass]="{ 'input-error': formErrors['captionFileContent'] }"
      #textarea
    >
    </textarea>

    <div *ngIf="formErrors.captionFileContent" class="form-error" role="alert">
      {{ formErrors.captionFileContent }}
    </div>
  </div>

  <div class="modal-footer inputs">
    <input
      type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button"
      (click)="cancel()" (key.enter)="cancel()"
    >

    <input
      type="submit" i18n-value value="Edit this caption" class="peertube-button orange-button"
      [disabled]="!form.valid" (click)="updateCaption()"
    >
  </div>
</ng-container>
